//
//  AttentionCollectionViewCell.m
//  YIJU2.0HD
//
//  Created by 张金国 on 16/5/25.
//  Copyright © 2016年 Mr.X. All rights reserved.
//

#import "AttentionCollectionViewCell.h"
#import "Masonry.h"


@interface AttentionCollectionViewCell ()

@property (nonatomic ,strong)UILabel     *textLabel;

@end

@implementation AttentionCollectionViewCell

#pragma mark - init
- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self setupConstraints];
    }
    return self;
}

#pragma mark - private
- (void)setupConstraints {
    [self.textLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self);
    }];
}

#pragma mark - getter
- (UILabel *)textLabel {
    if (!_textLabel) {
        _textLabel = [[UILabel alloc]init];
        _textLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_textLabel];
    }
    return _textLabel;
}

#pragma mark - setter
- (void)setLabelText:(NSString *)labelText {
    _labelText = labelText;
    _textLabel.text = labelText;
}
@end
